import request from '@/utils/request'

// 查询测试节点1列表
export function listzjk(query) {
  return request({
    url: '/ait/common/sql/queryByPage',
    method: 'get',
    params: query
  })
}

export function listzjkConfig(){
  return request({
    url:'/aitcommon/zjkconfig/list',
    method:'get',
    // 只查询生效
    params:{isEnable:1}
  })
}

export function exportzjk(query){
  return request({
    url:'/ait/common/sql/export',
    method:'get',
    params:query,
  })
}

/**
 * 执行FLOW流程
 * @param {*} type 就是FlowCode,及流程编码 
 * @param {*} codes 原来传入数据编码集合,暂时不用
 * @returns 
 */
export function handleflow(type,codes){
  // get方法通过逗号分隔传入数组
  let codestr=codes.join(",");
  return request({
    url:'/aitcommon/zjk/handleflow',
    method:'get',
    params:{type,codes:codestr}
  })
}


